/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Sjakk;
import javax.swing.ImageIcon;
/**
 *
 * @author agah
 */
public class Hest extends Brikke {
    public Hest(String id, String farge, int posX, int posY, boolean startPos){
        super(id, farge, posX, posY, startPos);
        java.net.URL url;
        if(farge.equals("Hvit")){
            url = Bonde.class.getResource("/hHest.png");
        } else {
            url = Bonde.class.getResource("/sHest.png");
        }
        icon = new ImageIcon(url);
    }
    @Override public int[][] lovligeFlytt(){
        int x = getPosX();
        int y = getPosY();
        int [][] lovlige = {
            {x+2, y+1},
            {x+2, y-1},
            {x-2, y+1},
            {x-2, y-1},
            {x+1, y+2},
            {x+1, y-2},
            {x-1, y+2},
            {x-1, y-2},
        };
        return lovlige;
    }
}
